/*CREATE TABLE office(
	id INT PRIMARY KEY AUTO_INCREMENT,
	NAME VARCHAR(18)
)

CREATE TABLE patient(
	id INT PRIMARY KEY AUTO_INCREMENT,
	NAME VARCHAR(18),
	gender int,
	did INT,
	advice VARCHAR(20)
)

INSERT INTO office VALUES(1,'外科'),(2,'内科'),(3,'妇科')

INSERT INTO patient VALUES(1,'张三',1,1,NULL),(2,'李四',0,1,'左脚骨裂'),(3,'王五',1,2,'心脏搭桥')
ALTER TABLE patient ADD FOREIGN KEY(did) REFERENCES office(id)
*/